/**
 * Predefined variables
 * Name = gamescence
 * DateTime = Wed Jan 19 2022 13:38:35 GMT+0800 (中国标准时间)
 * Author = Created by zhj9922
 * FileBasename = gamescence.ts
 * gitee： https://gitee.com/coyeking
 */
 
import { _decorator, Component, Node,Prefab,resources } from 'cc';
const { ccclass, property } = _decorator;
import { audioManager } from '../framework/audioManager';
import { resourceUtil } from '../framework/resourceUtil';
import { poolManager } from '../framework/poolManager';
 
@ccclass('gamescence')
export class gamescence extends Component {
    @property({
        type: Node,
        displayName:'游戏层',
    })
    public ui_game_node: Node = null;
	
    onEnable () {
        let _this = this;
        let kind = 'ddz'
        resources.load(`prefab/game/${kind}/GameLayer`,Prefab, function(err, prefab:Prefab) {
            if (err) {console.log('载入预制资源失败， 原因:' + err); return};
            poolManager.instance.getNode(prefab,_this.ui_game_node);
        });

    };
    
    onDestroy () {

    };
}

